/* 车辆&车牌查询 */
function getCheliangxx(url){
	$.dpAjax({
		show:true,
		url:url,
		data:{busiId:busiId},
		success: function(datas){
		 var data = datas.result;
		 if(data){
			//车辆信息
			var ywBusinessCar = data.ywBusinessCar;
			if(ywBusinessCar) {
				$('#che_categoryCar').text(ywBusinessCar.categoryCarDisplay);
				$('#che_colorCar').text(ywBusinessCar.colorCarDisplay);
				$('#che_numQualified').text(ywBusinessCar.numQualified);
				$('#che_carBrand').text(ywBusinessCar.nameCarBrand);
				$('#che_carSeries').text(ywBusinessCar.nameCarSeries);
				$('#che_carModel').text(ywBusinessCar.nameCarModel);
				$('#che_noticeModel').text(ywBusinessCar.noticeModel);
				$('#che_displacement').text(ywBusinessCar.displacement);
				$('#che_power').text(ywBusinessCar.power);
				$('#che_vin').text(ywBusinessCar.vin);
				
				$('#che_numEngine').text(ywBusinessCar.numEngine);
				$('#che_numChassisSix').text(ywBusinessCar.numChassisSix);
				$('#che_dateBill').text(formateDate(ywBusinessCar.dateBill));
				$('#che_numBill').text(ywBusinessCar.numBill);
				$('#che_areaBill').text(ywBusinessCar.areaBill);
				$('#che_companyBill').text(ywBusinessCar.companyBill);
			} else {
				clearBusinessCar();
			}
			var ywBusiness = data.ywBusiness;
			if(ywBusiness) {
				$('#che_pickCarTime').text(formateToMinutes(ywBusiness.pickCarTime));
			} else {
				$('#che_pickCarTime').text('-');
			}
			//车牌信息
			var dzRegistration = data.dzRegistration;
			var region; //上牌地
			if(dzRegistration) {
				if(dzRegistration.provinceRegistrationDisplay) {
					if(dzRegistration.provinceRegistrationDisplay == dzRegistration.areaRegistrationDisplay) {
						region = dzRegistration.provinceRegistrationDisplay;
					} else {
						region = dzRegistration.provinceRegistrationDisplay + dzRegistration.areaRegistrationDisplay;
					}
				} else {
					region = dzRegistration.areaRegistrationDisplay;
				}
				
				$('#che_dvm').text(dzRegistration.dvm);
				$('#che_licensePlate').text(dzRegistration.licensePlate);
				$('#che_registrationNumber').text(dzRegistration.registrationNumber);
				$('#che_dateRegistrationFirst').text(formateDate(dzRegistration.dateRegistrationFirst));
				$('#che_dateRegistrationNow').text(formateDate(dzRegistration.dateRegistrationNow));
				$('#che_remarks').html(dzRegistration.remarks);
			} else {
				clearRegistration();
			}
			$('#che_region').text(!region || region == '' ? ((ywBusinessCar && ywBusinessCar.registrationArea)? ywBusinessCar.registrationArea : '-') : region);
         }
	  }
	});
}

function clearBusinessCar(){
	$('#che_categoryCar').text('-');
	$('#che_colorCar').text('-');
	$('#che_numQualified').text('-');
	$('#che_carBrand').text('-');
	$('#che_carSeries').text('-');
	$('#che_carModel').text('-');
	$('#che_noticeModel').text('-');
	$('#che_displacement').text('-');
	$('#che_power').text('-');
	$('#che_vin').text('-');
	
	$('#che_numEngine').text('-');
	$('#che_numChassisSix').text('-');
	$('#che_dateBill').text('-');
	$('#che_numBill').text('-');
	$('#che_areaBill').text('-');
	$('#che_companyBill').text('-');
}
function clearRegistration(){
	$('#che_region').text('-');
	$('#che_dvm').text('-');
	$('#che_licensePlate').text('-');
	$('#che_registrationNumber').text('-');
	$('#che_dateRegistrationFirst').text('-');
	$('#che_dateRegistrationNow').text('-');
	$('#che_remarks').html('-');
}